////////////////////////////////////////////////////////////////////////////////////
//                                                                                                                                //
//                      Single Linked List's find, insert, delete, functions' implemention code                //
//                                                                                                                                //
//                                                                                                                                //
//                                      Author:    Jack Hui (huiguobin)                                                 //
//                                                                                                                                //
//                                                                                                                                //
////////////////////////////////////////////////////////////////////////////////////

//////////////////////////////Header File/////////////////////////////////////////////

#include <assert.h>
#include <stdlib.h>
#include <stdio.h>

typedef int DataType;

/*Single Linked List structure*/
typedef struct node{
	DataType data;
	struct node *link;
} LinkedNode, *LinkList;


/* Single Linked List's find function,
      LinkList L: pointer to the head of list;
      int k: the node's number to find. */
LinkList find_list(LinkList L, int k);


/* Single Linked List's insert function,
      LinkList L: pointer to the head of list;
      int k: position to insert; 
      DataType j: data to insert */
int insert_list(LinkList L, int k, DataType j);


/* Single Linked List's insert function,
      LinkList L: pointer to the head of list;
      int k: position to delete. */
int delete_list(LinkList L, int k);

